Blockly.Blocks['start'] = {
  init: function() {
    this.appendDummyInput()
        .appendField("当运行时");
    this.setPreviousStatement(false, null);
    this.setNextStatement(true, null);
    this.setColour(259);
 this.setTooltip("");
 this.setHelpUrl("");
 this.setMovable(false);
  }
};

Blockly.Blocks['moveforward_up'] = {
  init: function() {
    this.appendDummyInput()
        .appendField("上")
        .appendField(new Blockly.FieldImage("./res4/arrow_up.png", 30, 30, "*"));
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setColour(330);
 this.setTooltip("");
 this.setHelpUrl("");
  }
};

Blockly.Blocks['moveforward_down'] = {
  init: function() {
    this.appendDummyInput()
        .appendField("下")
        .appendField(new Blockly.FieldImage("./res4/arrow_down.png", 30, 30, "*"));
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setColour(330);
 this.setTooltip("");
 this.setHelpUrl("");
  }
};

Blockly.Blocks['moveforward_left'] = {
  init: function() {
    this.appendDummyInput()
        .appendField("左")
        .appendField(new Blockly.FieldImage("./res4/arrow_left.png", 30, 30, "*"));
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setColour(330);
 this.setTooltip("");
 this.setHelpUrl("");
  }
};

Blockly.Blocks['moveforward_right'] = {
  init: function() {
    this.appendDummyInput()
        .appendField("右")
        .appendField(new Blockly.FieldImage("./res4/arrow_right.png", 30, 30, "*"));
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setColour(330);
 this.setTooltip("");
 this.setHelpUrl("");
  }
};

Blockly.Blocks['jump'] = {
  init: function() {
    this.appendDummyInput()
        .appendField("跳")
        .appendField(new Blockly.FieldImage("./res4/jump.png", 30, 30, "*"));
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setColour(330);
 this.setTooltip("");
 this.setHelpUrl("");
  }
};